var lon;
var lat;
var reg;
var dat;
var mag;
var dist;
function ScnMappingAssistant(argFromPusher) {
	lon = argFromPusher.lon;
	lat = argFromPusher.lat;
	mag = argFromPusher.mag;
	dep = argFromPusher.dep;
	reg = argFromPusher.reg;
	dat = argFromPusher.dat;
	dist = argFromPusher.dist;
	showInfo = argFromPusher.showInfo;
}

ScnMappingAssistant.prototype = {
	setup: function() {
		Ares.setupSceneAssistant(this);
		if (showInfo == 1 || showInfo === true) {
			this.$.hdrMap.show();
		}
		else {
			this.$.hdrMap.hide();
		}
		this.$.hdrMap.setTitle(reg.truncate(30, '...'));
		this.$.hdrMap.setSubtitle($L("Magnitude:") + " " + mag + "&nbsp;/&nbsp;" + $L("Depth:") + " " + dep + "&nbsp;/&nbsp;" + $L("Dist:") + " " + dist +"<br>" + $L("Date/Time (UTC):") + " " + dat );
		this.$.map1.setLongitude(lon);
		this.$.map1.setLatitude(lat);
/*
		var cont = "<DIV style='font-size:14px;'>Magnitude:<b>&nbsp;" + mag + "</b></DIV><DIV style='font-size:14px;'>" + reg + "</DIV><DIV style='font-size:13px;'>&nbsp;" + dat;
		var mp = this.$.map1.map;
		try {
			var pos = new google.maps.LatLng(lat, lon);
			var imgPath;
			if (mag <= 5.5) {imgPath = "images/csGreen0.png";}
			else if (mag <= 6) {imgPath = "images/csYellow0.png";}
			else if (mag > 6) {imgPath = "images/csRed0.png";}
			var img = new google.maps.MarkerImage(imgPath);
			var ma = new google.maps.Marker({title: mag, position: pos, map: mp, icon: img});
			var iw = new google.maps.InfoWindow({content: cont, position: pos, maxWidth:10});
			iw.open(mp);
		}
		catch (err) {
			Mojo.Log.error(" ### Could not connect to Google Maps API.", err.message);
			Mojo.Controller.errorDialog($L({value: "Cannot connect to Google Maps! Please ensure you are connected to the internet.", key: "noGooleMapsAPI"}));
		}
*/	},
	
	cleanup: function() {
		this.controller.stageController.parentSceneAssistant(this).needRefresh = false;
		Ares.cleanupSceneAssistant(this);
	},
	hdrMapTap: function(inSender, event) {
		this.$.hdrMap.hide();
	}
};